import request from "@/utils/request";

export function getSpecimenPage (query) {
  return request({
    url: "/ny-iqc/exceptionList/getPage",
    method: "post",
    data: query,
  });
}

export function getStateCheckById (query) {
  return request({
    url: "/ny-iqc/exceptionList/getStateCheck",
    method: "get",
    params: query,
  });
}
export function getSpecimenById (query) {
  return request({
    url: "/ny-iqc/exceptionList/selectOne",
    method: "get",
    params: query,
  });
}

export function stateDealWith (data) {
  return request({
    url: "/ny-iqc/exceptionList/stateDealWith",
    method: "post",
    data,
  });
}

export function addSpecimen (data) {
  return request({
    url: "/ny-iqc/sampleManagement",
    method: "post",
    data,
  });
}
export function getSpecimen (query) {
  return request({
    url: "/ny-iqc/sampleManagement/list",
    method: "get",
    params: query,
  });
}
export function deleteSpecimen (query) {
  return request({
    url: "/ny-iqc/sampleManagement/",
    method: "delete",
    params: query,
  });
}
export function getSampleById (id) {
  return request({
    url: "/ny-iqc/sampleManagement/" + id,
    method: "get",
  });
}
export function getScrap (data) {
  return request({
    url: "/ny-iqc/sampleManagement/getScrap",
    method: "post",
    data,
  });
}
export function changeSpecimen(data) {
  return request({
    url: "/ny-iqc/sampleManagement/change",
    method: "put",
    data,
  });
}
export function getIdentification (query) {
  return request({
    url: "/ny-iqc/sampleManagement/getIdentification",
    method: "get",
    params: query,
  });
}
export function materialMiddleStatistics (data) {
  return request({
    url: "/ny-iqc/statistics/materialMiddleStatistics",
    method: "post",
    data,
  });
}
